set(TH_ARCH_FILES
        th_accelerate.h
        th_accelerate.cpp
        th_env.h
        th_env.cpp
        )


        
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
set(ENV_ROOT /thfs1/software/programming_env/mt3000_programming_env/hthreads)
set(MPI_ROOT /thfs1/software/mpich/mpi-x-gcc9.3.0)


# make md-sunway lib
add_library(${TH_LIB_NAME} STATIC ${TH_ARCH_FILES})


target_include_directories(
        ${TH_LIB_NAME}
        PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
)
include_directories(
        ${ENV_ROOT}/include
)

target_link_libraries(
        ${TH_LIB_NAME}
        PUBLIC
        md # so it can use included headers in md core
        -lpthread
        ${ENV_ROOT}/lib/libhthread_host.a
)
